from django.db import models

# Create your models here.
from domain.models import Domain

class Trend(models.Model):
    keyword = models.CharField(max_length=100, verbose_name="热点词汇")
    domain = models.ForeignKey(Domain, on_delete=models.CASCADE, related_name="trends", verbose_name="所属领域")
    created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    updated_at = models.DateTimeField(auto_now=True, verbose_name="更新时间")

    def __str__(self):
        return self.keyword